package com.cloudpan.entity.bo;

import cn.hutool.core.bean.BeanUtil;
import com.amazonaws.services.s3.model.PartSummary;
import com.cloudpan.entity.pojo.SysUploadTask;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import java.util.List;

/**
 * @author word
 */
@Data
@ToString
@Accessors(chain = true)
public class TaskRecordBo extends SysUploadTask {
    /**
     * 已上传完的分片
     */
    private List<PartSummary> exitPartList;

    public static TaskRecordBo convertFromEntity (SysUploadTask task) {
        TaskRecordBo dto = new TaskRecordBo();
        BeanUtil.copyProperties(task, dto);
        return dto;
    }
}
